package com.hsnn.medstgmini.settlement.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.hsnn.medstgmini.util.DateUtil;
import com.hsnn.medstgmini.util.ParseNumber;

/**
 * @category 账户信息实体类
 * @author 韩守松
 * @date 2015年7月21日
 */
@Entity
@Table(name = "set_acctinfo")
public class SetAcctInfo implements Serializable {
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = -32029141190188688L;

	private String orgId;// 账户id(机构id)
	private String orgCode;// 机构编号
	private String orgName;// 机构名称
	private Integer orgType;// 机构类型
	private Double outstandAmt;// 余额
	private String outstandAmtStr; // 格式化余额
	private Date outstandAmtUpdDttm;// 余额更新时间
	private String outstandAmtUpdDttmStr; //
	private Double availableAmt;// 可用余额
	private String availableAmtStr; // 格式化可用余额
	private Date availableAmtUpdDttm;// 可用余额更新时间
	private String availableAmtUpdDttmStr; //
	private Double pendingAmt;// 待结算金额
	private String pendingAmtStr; // 格式化待结算金额
	private Date pendingAmtUpdDttm;// 待结算金额更新时间
	private String pendingAmtUpdDttmStr; //
	private Date updDatetime;// 更新时间
	private String updUser;// 更新人

	@Id
	@Column(name = "org_id", length = 36)
	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	@Column(name = "org_code", length = 36)
	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	@Column(name = "org_name", length = 512)
	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	@Column(name = "org_type")
	public Integer getOrgType() {
		return orgType;
	}

	public void setOrgType(Integer orgType) {
		this.orgType = orgType;
	}

	@Column(name = "outstand_amt", length = 36)
	public Double getOutstandAmt() {
		return outstandAmt;
	}

	public void setOutstandAmt(Double outstandAmt) {
		this.outstandAmt = outstandAmt;
	}

	@Column(name = "outstand_amt_upd_dttm", length = 36)
	public Date getOutstandAmtUpdDttm() {
		return outstandAmtUpdDttm;
	}

	public void setOutstandAmtUpdDttm(Date outstandAmtUpdDttm) {
		this.outstandAmtUpdDttm = outstandAmtUpdDttm;
	}

	@Column(name = "available_amt", length = 36)
	public Double getAvailableAmt() {
		return availableAmt;
	}

	public void setAvailableAmt(Double availableAmt) {
		this.availableAmt = availableAmt;
	}

	@Column(name = "available_amt_upd_dttm", length = 36)
	public Date getAvailableAmtUpdDttm() {
		return availableAmtUpdDttm;
	}

	public void setAvailableAmtUpdDttm(Date availableAmtUpdDttm) {
		this.availableAmtUpdDttm = availableAmtUpdDttm;
	}

	@Column(name = "pending_amt", length = 36)
	public Double getPendingAmt() {
		return pendingAmt;
	}

	public void setPendingAmt(Double pendingAmt) {
		this.pendingAmt = pendingAmt;
	}

	@Column(name = "pending_amt_upd_dttm", length = 36)
	public Date getPendingAmtUpdDttm() {
		return pendingAmtUpdDttm;
	}

	public void setPendingAmtUpdDttm(Date pendingAmtUpdDttm) {
		this.pendingAmtUpdDttm = pendingAmtUpdDttm;
	}

	@Column(name = "upd_datetime", length = 36)
	public Date getUpdDatetime() {
		return updDatetime;
	}

	public void setUpdDatetime(Date updDatetime) {
		this.updDatetime = updDatetime;
	}

	@Column(name = "upd_user", length = 36)
	public String getUpdUser() {
		return updUser;
	}

	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}

	@Transient
	public String getOutstandAmtStr() {
		if (outstandAmt != null) {
			outstandAmtStr = ParseNumber.toStrDecimal(outstandAmt);
		}
		return outstandAmtStr;
	}

	public void setOutstandAmtStr(String outstandAmtStr) {
		this.outstandAmtStr = outstandAmtStr;
	}

	@Transient
	public String getAvailableAmtStr() {
		if (availableAmt != null) {
			availableAmtStr = ParseNumber.toStrDecimal(availableAmt);
		}
		return availableAmtStr;
	}

	public void setAvailableAmtStr(String availableAmtStr) {
		this.availableAmtStr = availableAmtStr;
	}

	@Transient
	public String getPendingAmtStr() {
		if (pendingAmt != null) {
			pendingAmtStr = ParseNumber.toStrDecimal(pendingAmt);
		}
		return pendingAmtStr;
	}

	public void setPendingAmtStr(String pendingAmtStr) {
		this.pendingAmtStr = pendingAmtStr;
	}

	@Transient
	public String getOutstandAmtUpdDttmStr() {
		if (outstandAmtUpdDttm != null) {
			outstandAmtUpdDttmStr = DateUtil.dateTime(outstandAmtUpdDttm);
		}
		return outstandAmtUpdDttmStr;
	}

	public void setOutstandAmtUpdDttmStr(String outstandAmtUpdDttmStr) {
		this.outstandAmtUpdDttmStr = outstandAmtUpdDttmStr;
	}

	@Transient
	public String getAvailableAmtUpdDttmStr() {
		if (availableAmtUpdDttm != null) {
			availableAmtUpdDttmStr = DateUtil.dateTime(availableAmtUpdDttm);
		}
		return availableAmtUpdDttmStr;
	}

	public void setAvailableAmtUpdDttmStr(String availableAmtUpdDttmStr) {
		this.availableAmtUpdDttmStr = availableAmtUpdDttmStr;
	}

	@Transient
	public String getPendingAmtUpdDttmStr() {
		if (pendingAmtUpdDttm != null) {
			pendingAmtUpdDttmStr = DateUtil.dateTime(pendingAmtUpdDttm);
		}
		return pendingAmtUpdDttmStr;
	}

	public void setPendingAmtUpdDttmStr(String pendingAmtUpdDttmStr) {
		this.pendingAmtUpdDttmStr = pendingAmtUpdDttmStr;
	}

}